#include "UpdServer.hpp"
#include <memory>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>


int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        std::cerr<<"Usage :"<<argv[0]/*可执行程序对应的名称*/<<"locl port"<<std::endl;
        exit(0);
    }
    uint16_t  port=std::stoi(argv[2]);
    //启用日志
    EnableScreen();
    std::unique_ptr<Udpserver> usvr =std::make_unique<Udpserver>(port);
    usvr->InitServer();
    usvr->Start();
    return 0;
}